package com.sanyang.pda.ui.failedmanager;

import android.os.Bundle;
import android.widget.Button;

import androidx.recyclerview.widget.RecyclerView;

import com.sanyang.pda.adapter.AlreadyDeliveryAdapter;
import com.sanyang.pda.bean.AlreadyDeliveryBean;
import com.sanyang.pda.contract.AlreadyDeliveryContract;
import com.sanyang.pda.presenter.AlreadyDeliveryPresenter;
import com.wangshen.base.ui.mvp.base.ui.BaseMvpActivity;
import com.wangshen.base.ui.mvp.base.ui.BaseMvpFragment;
import com.wangshen.projectbase.R;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class AlreadyDeliveryFragment extends BaseMvpFragment<AlreadyDeliveryPresenter> implements AlreadyDeliveryContract.View {

    @BindView(R.id.rv_list)
    RecyclerView rvList;
    @BindView(R.id.bt_scrap)
    Button btScrap;
    @BindView(R.id.bt_repackage)
    Button btRepackage;
    @BindView(R.id.bt_add)
    Button btAdd;
    AlreadyDeliveryAdapter alreadyDeliveryAdapter;
    @Override
    public AlreadyDeliveryPresenter getPresenter() {
        return new AlreadyDeliveryPresenter();
    }


    @Override
    public int getViewId() {
        return R.layout.fragment_already_delivery;
    }

    @Override
    public void initView() {
        alreadyDeliveryAdapter=new AlreadyDeliveryAdapter(R.layout.item_already_delivery,new ArrayList<>());
    }

    @Override
    public void initLinsenterner() {

    }

    @Override
    public void getData() {
        presenter.toBeProcessedList(1,10);
    }


    @OnClick(R.id.bt_scrap)
    public void onBtScrapClicked() {

    }

    @OnClick(R.id.bt_repackage)
    public void onBtRepackageClicked() {

    }

    @OnClick(R.id.bt_add)
    public void onBtAddClicked() {

    }

    @Override
    public void setList(List<AlreadyDeliveryBean> list) {
       alreadyDeliveryAdapter.setNewInstance(list);
    }

    @Override
    public void setSuccess() {
        presenter.toBeProcessedList(1,10);
    }
}